package org.etsi.ttcn.tci;

import org.etsi.ttcn.tri.TriComponentId ;

public interface TciTMProvided {

/**
 *  Will be only called after either the control part of the module or a test case has been
 *  started using the required operations tciStartControl or tciStartTestCase
 *
 *  tciTestCaseStarted indicated the TM that a test case with testCaseId has been started. 
 *  It will be not distinguished whether the test case has been started explicitly using the
 *  required operation tciStartTestCase or implicitly while executing the control part.
 */
    public void tciTestCaseStarted (TciTestCaseId testCaseId, TciParameterList parameterList, Float timer);

/**
 *  Will be only called after either the control part of the module or a test cases has been
 *  started using the required operations tciStartControl or tciStartTestCase.
 *
 *  This operation will be called by the TE to indicate the test management that the test case
 *  that has been currently executed on the mtc has terminated and that the final verdict was
 *  verdict. On the invocation of a tciTestCaseTerminated operation all out and inout test case
 *  parameters contain Values. All in test case parameters contain the distinct value of null
 *  since they are only of relevance to the test case start but not in the reply to the call..
 *
 */
    public void tciTestCaseTerminated ( VerdictValue verdict, TciParameterList parameterList);

/**
 *  Will only be called when the module execution has been started using the tciStartControl operation.
 *
 *  This operation will be called by the TE to indicates the test management that the control part
 *  of the selected module has just terminated execution.
 */
    public void tciControlTerminated ();

/**
 *  This operation will be called whenever the TE needs to access the value of a module parameter.
 *  Every accessed module parameter will be resolved only once between a tciStartTestCase and
 *  tciTestCaseTerminated pair if a test case has been started explicitly or between a tciStartControl
 *  and tciControlTerminated pair if the control part of a module has been started.
 *
 *  The management provides to the TE a Value for the indicated parameterId. In case the management
 *  cannot provide a TTCN-3 value, the distinct null value shall be returned.
 */
    public Value tciGetModulePar (TciModuleParameterId parameterId);

/**
 *  Will only be called by the TE when the TTCN-3 statement log will be executed,
 *  either in the control part of a module or within the test case.
 *
 *  tciLog will be called by the TTCN-3 TE when the TTCN-3 Log statement will be called.
 */
    public void tciLog (TriComponentId testComponentId, String message);

/**
 *  Will be called at any time by the TE to indicate an unrecoverable error situation.
 *  This error situation could either be indicated by the CH or the CD or could occur within the TE
 *
 *  The TE indicates the occurrence of an unrecoverable error situation. message contains a reason
 *  phrase that might be communicated to the test system user. It is up to the management to terminate
 *  execution of test cases or control parts if running. In any case the test management has to take
 *  explicit measures in order to terminate immediately test execution.
 */
    public void tciError (String message);

} // TciTMProvided

